package com.xinghai.system.domain.entity;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 用户对象 qd_user
 *
 * @author xinghai
 * @date 2024-12-04
 */
@Data
public class LoginDTO
{

    //主账号userId
    private String userId;
    /** 用户手机号 */
    @NotBlank(message = "请输入联系电话")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}", message = "手机号格式有误")
    private String userPhone;

    /** 密码 */
    @NotBlank(message = "登录密码为空")
    private String password;

    /** 类型，1当前账号绑定 2双向绑定 */
    private String type ;

}
